package simple.jsf2;
 
import java.io.Serializable;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Out;
import static org.jboss.seam.ScopeType.SESSION;
//@ManagedBean
//@SessionScoped
@Name("helloWorldBean")
@Scope(SESSION)
public class HelloWorldBean implements Serializable {
 
  private String name = "";   
 
 // @ManagedProperty(value = "#{demoService}")
  @In("demoService")
  private Service service;
 
  public String getName() {
	  System.out.println("getName()");
    return name;
  }
 
  public void setName(String name) {
    this.name = name;
  }
 
  public void setService(Service service) {
	  System.out.println("service "+service);
    this.service = service;
  }
 
  public String getReverseName() {
    return service.reverse(name);
  }
}